import { createRouter,createWebHistory } from 'vue-router'

const routes = [
    {
        path:"/",
        redirect:"/dashboard"
    },
    {
        path:"/dashboard",
        name:"Dashboard",
        component:()=>import('@/views/Dashboard.vue'),
        meta:{title:'首页',icon:'dashboard'}
    },
    {
        path:"/system",
        name:"System",
        meta:{title:'系统管理',icon:'system'},
        children:[
            {
                path: 'user',
                name: 'User',
                component: () => import('@/views/system/User.vue'),
                meta: { title: '用户管理', icon: 'user' }
            }
        ]
    }
]

const router = createRouter({
    history:createWebHistory(),
    routes
})

export default router;